import { getStorage, setStorage } from "@/utils/index"

const state = {
    systemInfo: getStorage("systemInfo") || {},
};

export default {
    state,
    getters:{
        systemInfo:(state)=>state.systemInfo
    },
    mutations:{
        async setSystemInfo (state, options = {}) {
            state.systemInfo = options
            await setStorage('systemInfo',options)
        }
    },
    actions:{
        setSystemInfo({ commit }, options= {}){
            commit('setSystemInfo', options)
        }
    }
}